import {
  BwComPropSetConstValueComEnum,
  BwCustomComSoltTypeEnum,
  BwCustomComPropDataTypeEnum,
  BwCustomComEmitParamDataTypeEnum,
} from '../../../render/models'
import type {
  BwCustomComEmitInfoModel,
  BwCustomComSlotInfoModel,
  BwCustomComPropInfoModel,
} from '../../../render/models'

/** 组件属性 */
const comAttrs: Array<BwCustomComPropInfoModel> = [
  {
    key: 'flex',
    name: 'flex布局填充',
    isRequire: false,
    defaultValue: undefined,
    dataType: [
      BwCustomComPropDataTypeEnum.string,
      BwCustomComPropDataTypeEnum.number,
    ],
    defaultValueDataType: BwCustomComPropDataTypeEnum.number,
    constValueSetCom: BwComPropSetConstValueComEnum.number,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'class',
    name: 'classNames',
    isRequire: false,
    defaultValue: undefined,
    dataType: [
      BwCustomComPropDataTypeEnum.string,
      BwCustomComPropDataTypeEnum.array,
    ],
    defaultValueDataType: BwCustomComPropDataTypeEnum.string,
    constValueSetCom: BwComPropSetConstValueComEnum.input,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'style',
    name: '行内样式',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.string],
    defaultValueDataType: BwCustomComPropDataTypeEnum.string,
    constValueSetCom: BwComPropSetConstValueComEnum.input,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'span',
    name: '栅格占位格数',
    isRequire: false,
    defaultValue: undefined,
    dataType: [
      BwCustomComPropDataTypeEnum.string,
      BwCustomComPropDataTypeEnum.number,
    ],
    defaultValueDataType: BwCustomComPropDataTypeEnum.number,
    constValueSetCom: BwComPropSetConstValueComEnum.number,
    constValueSetComProps: JSON.stringify({
      max: 24,
      min: 0,
    }),
    remark: '为 0 时相当于 display: none',
  },
  {
    key: 'offset',
    name: '左间隔格数',
    isRequire: false,
    defaultValue: '0',
    dataType: [BwCustomComPropDataTypeEnum.number],
    defaultValueDataType: BwCustomComPropDataTypeEnum.number,
    constValueSetCom: BwComPropSetConstValueComEnum.number,
    constValueSetComProps: JSON.stringify({
      max: 24,
      min: 0,
    }),
    remark: '',
  },
  // {
  //   key: 'order',
  //   name: '栅格顺序',
  //   isRequire: false,
  //   defaultValue: '0',
  //   dataType: [BwCustomComPropDataTypeEnum.number],
  //   defaultValueDataType: BwCustomComPropDataTypeEnum.number,
  //   constValueSetCom: BwComPropSetConstValueComEnum.number,
  //   constValueSetComProps: null,
  //   remark: 'flex 布局模式下有效',
  // },
  {
    key: 'pull',
    name: '左偏移格数',
    isRequire: false,
    defaultValue: '0',
    dataType: [BwCustomComPropDataTypeEnum.number],
    defaultValueDataType: BwCustomComPropDataTypeEnum.number,
    constValueSetCom: BwComPropSetConstValueComEnum.number,
    constValueSetComProps: JSON.stringify({
      max: 24,
      min: 0,
    }),
    remark: '',
  },
  {
    key: 'push',
    name: '右偏移格数',
    isRequire: false,
    defaultValue: '0',
    dataType: [BwCustomComPropDataTypeEnum.number],
    defaultValueDataType: BwCustomComPropDataTypeEnum.number,
    constValueSetCom: BwComPropSetConstValueComEnum.number,
    constValueSetComProps: JSON.stringify({
      max: 24,
      min: 0,
    }),
    remark: '',
  },
  {
    key: 'xs',
    name: '<576px 响应式栅格',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.object],
    defaultValueDataType: BwCustomComPropDataTypeEnum.object,
    constValueSetCom: BwComPropSetConstValueComEnum.colSpan,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'sm',
    name: '≥576px 响应式栅格',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.object],
    defaultValueDataType: BwCustomComPropDataTypeEnum.object,
    constValueSetCom: BwComPropSetConstValueComEnum.colSpan,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'md',
    name: '≥768px 响应式栅格',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.object],
    defaultValueDataType: BwCustomComPropDataTypeEnum.object,
    constValueSetCom: BwComPropSetConstValueComEnum.colSpan,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'lg',
    name: '≥992px 响应式栅格',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.object],
    defaultValueDataType: BwCustomComPropDataTypeEnum.object,
    constValueSetCom: BwComPropSetConstValueComEnum.colSpan,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'xl',
    name: '≥1200px 响应式栅格',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.object],
    defaultValueDataType: BwCustomComPropDataTypeEnum.object,
    constValueSetCom: BwComPropSetConstValueComEnum.colSpan,
    constValueSetComProps: null,
    remark: '',
  },
  {
    key: 'xxl',
    name: '≥1600px 响应式栅格',
    isRequire: false,
    defaultValue: undefined,
    dataType: [BwCustomComPropDataTypeEnum.object],
    defaultValueDataType: BwCustomComPropDataTypeEnum.object,
    constValueSetCom: BwComPropSetConstValueComEnum.colSpan,
    constValueSetComProps: null,
    remark: '',
  },
]

/** 组件事件 */
const comEmits: Array<BwCustomComEmitInfoModel> = []

/** 组件插槽 */
const comSlots: Array<BwCustomComSlotInfoModel> = [
  {
    slotType: BwCustomComSoltTypeEnum.convention,
    conventionSlotInfo: {
      slotCode: 'default',
      slotName: '默认插槽',
    },
  },
]

export const antColInfo = {
  comAttrs,
  comEmits,
  comSlots,
}
